<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['系统配置','固件管理','bin文件上传']" icon="fa fa-cog" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="s_page_wrap">
		<div class="page-header">
			<h1 class="page_detail_title">Bin文件上传</h1>
		</div>
		<div class="row" style="margin-top:5px;">
			<div class="col-xs-12">
				<form  name="userForm" class="form-horizontal" (ngSubmit)="onSubmit($event)" novalidate="novalidate" [saBootstrapValidator]="validatorOptions">
	
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">版本号</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="version" type="text"  placeholder="版本号" [(ngModel)]='page.version' />
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">描述</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control"  name="description" type="text" placeholder="描述" [(ngModel)]='page.description'/>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right" for="icon">包大小</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="packetSize" type="text"  value="1024" [(ngModel)]='page.packetSize'/>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right" for="icon">关联公司</label>
						<div class="col-sm-10">
							<sa-company-tree companyTreeId="companyTree" [Height]="32" [inputName]="'parentCompanyName'" [companyNameValue]="page.parentName" [companyIdValue]="page.parentId" (companySelected)="companySelected($event)"></sa-company-tree>
						</div>
					</div>
					<div class="form-group clearfix">
						<label class="control-label col-sm-1 no-padding-right">车辆用途</label>
						<div class="col-sm-10">
							<div class="clearfix s_fix_select2">
								<select class="form-control select2" id="useTypeSelect" select2 name="carUseType" style="width: 100%">
									<option value="">请选择</option>
									<optgroup *ngFor="let item of carTypeList" [label]="item.label">
				                        <option *ngFor="let itemChild of item.children" [value]='itemChild.id'>{{itemChild.label}}</option>
			                      	</optgroup>
								</select>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">协议版本</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<select name="protocolVersion" class="form-control" [(ngModel)]='page.protocolVersion'>
									<option value="1">第一代</option>
									<option value="2">第二代</option>
									<option value="3">808协议</option>
								</select>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">APP升级</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<select name="appSupport" class="form-control" [(ngModel)]='page.appSupport'>
									<option value="0">不支持</option>
									<option value="1">支持</option>
								</select>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">硬件版本</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<select name="hwVersion" class="form-control" [(ngModel)]='page.hwVersion'>
									<option value="">请选择</option>
									<option value="4">V4</option>
									<option value="5">V5</option>
									<option value="7">V7</option>
									<option value="8">V8</option>
									<option value="9">V9</option>
									<option value="10">V10</option>
								</select>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right" for="description">Bin文件</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<label class="ace-file-input ace-file-multiple">
									<input type="file" id="binFile" name="binFile"  (change)="getFile($event.target.files)">
								</label>
							</div>
						</div>
					</div>

					<div class="form-group" style="display: flex">
						<label class="control-label col-sm-1 no-padding-right">默认固件</label>
						<label class="checkbox-inline">
							<input class="checkbox style-0" style="visibility: visible"  type="checkbox" name="isDefault" id="isDefault">
							<!-- <span>新项目自动分配</span> -->
						</label>
					</div>


					<div class="center">
						<button type="button" class="btn btn-primary" (click)="uploadFile()">上传</button>
						<button type="button" (click)='goBack()' class="btn default">返回</button>
					</div>
				</form>
				<div class="hr hr-dotted"></div>
			</div>
		</div>
	</div>
</div>